// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import VueValidator from 'vue-validator'
import App from './App'
import $ from 'jquery'
import router from './router'

import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
import iView from 'iview'
import 'iview/dist/styles/iview.css'
Vue.use(iView)
Vue.use(VueValidator)


router.beforeEach((to, from, next) => {
    NProgress.start()
    setTimeout(() => {
        next()
    }, 300)
})
router.afterEach((transition) => {
    NProgress.done()
})



new Vue({
    el: '#app',
    router,
    template: '<App/>',
    components: { App }
})